package jtk.project4.fleet.field;
//septian
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;

public class NewEquipmentTireTabField extends GroupControl{
	
	private EquipmentTiresAxlesField tiresAxlesField;
	private EquipmentTiresFrontTiresField tiresFrontTiresField;
	private EquipmentTiresRearTiresField tiresRearTiresField;
	private EquipmentTiresTiresCofigurationField tiresCofigurationField;
	 
	public NewEquipmentTireTabField(String bindID) {
		setBindID(bindID);
		createFields();
		addField(createLayout());
	}

	private void createFields(){
		tiresAxlesField = new EquipmentTiresAxlesField("Axle");
		tiresFrontTiresField= new EquipmentTiresFrontTiresField("Front Tires");
		tiresRearTiresField = new EquipmentTiresRearTiresField("Rear Tires");
		tiresCofigurationField = new EquipmentTiresTiresCofigurationField("tires config");
	}
	
	private GroupControl createLayout(){
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(tiresCofigurationField)
		.addField(insideField());
		return form;
	}
	
	private GroupControl insideField() {
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(tiresAxlesField)
		.addRow()
		.addField(tiresFrontTiresField)
		.addRow()
		.addField(tiresRearTiresField);
		return form;
	}
}
